texteditor.cpp
changeset 497 ab118b86bc54
parent 486 9c86935835a4
child 503 48ca4c364eab
     1.1 --- a/texteditor.cpp	Mon May 21 13:05:26 2007 +0000
     1.2 +++ b/texteditor.cpp	Wed May 30 15:23:07 2007 +0000
     1.3 @@ -60,9 +60,9 @@
     1.4  	move   (settings.value ( "/satellite/noteeditor/geometry/pos", QPoint (250,50)).toPoint());
     1.5  	
     1.6  	if (settings.value ( "/satellite/noteeditor/showWithMain",true).toBool())
     1.7 -		show();
     1.8 +		setShowWithMain (true);
     1.9  	else	
    1.10 -		hide();
    1.11 +		setShowWithMain (false);
    1.12  
    1.13  	varFont.fromString( settings.value
    1.14  		("/satellite/noteeditor/fonts/varFont",
    1.15 @@ -100,7 +100,7 @@
    1.16  	settings.setValue( "/satellite/noteeditor/geometry/pos", pos() );
    1.17  	settings.setValue ("/satellite/noteeditor/state",saveState(0));
    1.18  	
    1.19 -	settings.setValue( "/satellite/noteeditor/showWithMain",isVisible());
    1.20 +	settings.setValue( "/satellite/noteeditor/showWithMain",showwithmain);
    1.21  
    1.22  	QString s;
    1.23  	if (actionSettingsFonthintDefault->isOn() )
    1.24 @@ -122,6 +122,17 @@
    1.25  		return true;
    1.26  }
    1.27  
    1.28 +void TextEditor::setShowWithMain(bool v)
    1.29 +{
    1.30 +	showwithmain=v;
    1.31 +}
    1.32 +
    1.33 +bool TextEditor::showWithMain()
    1.34 +{
    1.35 +	return showwithmain;
    1.36 +}
    1.37 +
    1.38 +
    1.39  void TextEditor::setFontHint (const QString &fh)
    1.40  {
    1.41  	if (fh=="fixed")
    1.42 @@ -489,6 +500,7 @@
    1.43  void TextEditor::closeEvent( QCloseEvent* ce )
    1.44  {
    1.45      ce->accept();	// TextEditor can be reopened with show()
    1.46 +	showwithmain=false;
    1.47  	hide();
    1.48  	emit (windowClosed() );
    1.49      return;