[Kst] branches/work/kst/portto4/kst/src/libkstapp

Nicolas Brisset nicolas.brisset at eurocopter.com
Sat Mar 10 11:39:01 UTC 2012


SVN commit 1284792 by brisset:

Make sure that adding view items is registered as a change.

Barth, please review: I'm not familiar with the undo/redo code and I'm not sure I put it in the right place. In particular, when adding an item, hitting undo and 
trying to open a file it prompts for saving while it actually shouldn't. 
I'm committing this anyway as the current behavior is better than not prompting for save at all when view item(s) have been added. But we can possibly make it even 
better.


 M  +1 -1      viewitem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #1284791:1284792
@@ -134,7 +134,6 @@
   setAcceptDrops(false);
 
   ViewItemManager::self()->addViewItem(this);
-
 }
 
 
@@ -2330,6 +2329,7 @@
 void CreateCommand::creationComplete() {
   _view->undoStack()->push(this);
   kstApp->mainWindow()->clearDrawingMarker();
+  kstApp->mainWindow()->document()->setChanged(true);
 }
 
 


More information about the Kst mailing list