| Summary: | View Object creation impossible w/out plots created first | ||
|---|---|---|---|
| Product: | [Applications] kst | Reporter: | Netterfield <netterfield> |
| Component: | general | Assignee: | kst |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 1.x | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Netterfield
2005-12-02 20:40:08 UTC
This is a quirk of MDI. There is no tab yet, so no-where to draw. In childframe or other mode, there will be a window created if we create a view. Do you want that to be the case? If so, it's a one-liner. (and what do we name that window then?) We should start with a single view created, called i18n("default name of first
window", "W1");
On December 2, 2005 12:05 pm, George Staikos wrote:
> This is a quirk of MDI. There is no tab yet, so no-where to draw. In
> childframe or other mode, there will be a window created if we create a
> view. Do you want that to be the case? If so, it's a one-liner. (and what
> do we name that window then?)
SVN commit 485093 by staikos:
Create a default window on startup
BUG:117535
M +1 -1 kst.cpp
M +1 -0 kstdoc.cpp
--- trunk/extragear/graphics/kst/kst/kst.cpp #485092:485093
@@ -917,7 +917,7 @@
void KstApp::initDocument() {
doc = new KstDoc(this);
- doc->newDocument();
+ QTimer::singleShot(0, this, SLOT(slotFileNew()));
}
--- trunk/extragear/graphics/kst/kst/kstdoc.cpp #485092:485093
@@ -163,6 +163,7 @@
_modified = false;
_absFilePath = QDir::homeDirPath();
_title = i18n("Untitled");
+ KstApp::inst()->newWindow(i18n("default name of first window", "W1"));
createScalars();
emit updateDialogs();
//}
After this change if I create some plots from the command line then I am first queried with "The current plot definition has been modified. Do you want to save it?". This should not happen. SVN commit 485358 by staikos:
Use more of a hack for the startup-with-window implementation so that the
command-line still works. Only creates a window if one doesn't exist.
BUG: 117535
M +9 -3 kst.cpp
M +1 -0 kst.h
--- trunk/extragear/graphics/kst/kst/kst.cpp #485357:485358
@@ -917,10 +917,17 @@
void KstApp::initDocument() {
doc = new KstDoc(this);
- QTimer::singleShot(0, this, SLOT(slotFileNew()));
+ QTimer::singleShot(0, this, SLOT(delayedDocInit()));
}
+void KstApp::delayedDocInit() {
+ if (!activeWindow()) {
+ doc->newDocument();
+ }
+}
+
+
void KstApp::forceUpdate() {
_updateThread->forceUpdate();
}
@@ -1024,6 +1031,7 @@
config->sync();
}
+
void KstApp::readOptions() {
config->setGroup("General Options");
_recent->loadEntries(config, "Recent Files");
@@ -1156,9 +1164,7 @@
slotFileSaveAs();
} else {
slotUpdateStatusMsg(i18n("Saving file..."));
-
doc->saveDocument(doc->absFilePath());
-
slotUpdateStatusMsg(i18n("Ready"));
}
}
--- trunk/extragear/graphics/kst/kst/kst.h #485357:485358
@@ -222,6 +222,7 @@
void fixKMdi();
void showContextMenu(QWidget *w, const QPoint& pos);
void showContextMenu(const QPoint& pos);
+ void delayedDocInit();
public slots:
void fromEnd();
|