View Issue Details

IDProjectCategoryView StatusLast Update
0022409LazarusIDEpublic2012-09-29 22:59
ReporterBart BroersmaAssigned ToJuha Manninen 
PrioritylowSeveritytrivialReproducibilityalways
Status closedResolutionfixed 
Platformi386OSWindowOS VersionWin7
Product Version1.1 (SVN)Product Buildr37908 
Target VersionFixed in Version1.1 (SVN) 
Summary0022409: SourceEditor: Close All Other Pages shows (unneccessary) confirmation dialog if active tab content is modified (patch attached)
DescriptionWhen you want to close all other pages in the editor (right-click on tab and select appropriate item from contextmenu) and the current active pages' content is modified a confirmation dialog pops up: "Source of page "<pagename>"has changed. Save?"

However, since we are NOT going to close this page, the dialog (and the question) is redundant, and confusing.
This check should only be performed for the actual pages we're about to close.
Steps To ReproduceStart Lazarus.
Make sure you have at leat 2 (unmodified) pages open in the SE.
Make page 1 active.
Make some change to the content of page 1
Do not change the content of any of the other pages
Right-click on the tab of page 1
Select "Close All Other Pages"
The dialog will pop-up.
TagsNo tags attached.
Fixed in Revisionr38666
LazTarget-
Widgetset
Attached Files
  • main.onsrcnotebookfileclose.diff (594 bytes)
    Index: ide/main.pp
    ===================================================================
    --- ide/main.pp	(revision 37908)
    +++ ide/main.pp	(working copy)
    @@ -3189,7 +3189,8 @@
     
         NeedSave := 0;
         for i := 0 to ActiveSrcNoteBook.EditorCount - 1 do begin
    -      if CheckEditorNeedsSave(ActiveSrcNoteBook.Editors[i], True) then begin
    +      //no need for CheckEditorNeedsSave ActiveSourcenoteBook (i = PageIndex)
    +      if (i <> PageIndex) and CheckEditorNeedsSave(ActiveSrcNoteBook.Editors[i], True) then begin
             inc(NeedSave);
             if NeedSave = 1 then Idx := i;
           end;
    

Activities

2012-07-11 18:57

 

main.onsrcnotebookfileclose.diff (594 bytes)
Index: ide/main.pp
===================================================================
--- ide/main.pp	(revision 37908)
+++ ide/main.pp	(working copy)
@@ -3189,7 +3189,8 @@
 
     NeedSave := 0;
     for i := 0 to ActiveSrcNoteBook.EditorCount - 1 do begin
-      if CheckEditorNeedsSave(ActiveSrcNoteBook.Editors[i], True) then begin
+      //no need for CheckEditorNeedsSave ActiveSourcenoteBook (i = PageIndex)
+      if (i <> PageIndex) and CheckEditorNeedsSave(ActiveSrcNoteBook.Editors[i], True) then begin
         inc(NeedSave);
         if NeedSave = 1 then Idx := i;
       end;

Bart Broersma

2012-07-11 19:02

developer   ~0060984

@Mattias: not sure if I am supposed to assign this to you (or any other devel).
I don't have commit rights for the ide.

Juha Manninen

2012-09-15 12:18

developer   ~0062374

Applied, thanks.

Bart Broersma

2012-09-29 22:59

developer   ~0062746

Fixed.

Issue History

Date Modified Username Field Change
2012-07-11 18:12 Bart Broersma New Issue
2012-07-11 18:12 Bart Broersma LazTarget => -
2012-07-11 18:57 Bart Broersma File Added: main.onsrcnotebookfileclose.diff
2012-07-11 18:59 Bart Broersma Summary SourceEditor: Close All Other Pages shows (unneccessary) confrimation dialog if active tab content is modified => SourceEditor: Close All Other Pages shows (unneccessary) confrimation dialog if active tab content is modified (patch attached)
2012-07-11 19:00 Bart Broersma Status new => assigned
2012-07-11 19:00 Bart Broersma Assigned To => Mattias Gaertner
2012-07-11 19:02 Bart Broersma Note Added: 0060984
2012-07-11 19:02 Bart Broersma Summary SourceEditor: Close All Other Pages shows (unneccessary) confrimation dialog if active tab content is modified (patch attached) => SourceEditor: Close All Other Pages shows (unneccessary) confirmation dialog if active tab content is modified (patch attached)
2012-09-15 11:04 Juha Manninen Assigned To Mattias Gaertner => Juha Manninen
2012-09-15 12:18 Juha Manninen Fixed in Revision => r38666
2012-09-15 12:18 Juha Manninen Status assigned => resolved
2012-09-15 12:18 Juha Manninen Resolution open => fixed
2012-09-15 12:18 Juha Manninen Note Added: 0062374
2012-09-29 22:59 Bart Broersma Status resolved => closed
2012-09-29 22:59 Bart Broersma Note Added: 0062746
2012-09-29 22:59 Bart Broersma Fixed in Version => 1.1 (SVN)
2012-11-13 10:45 Martin Friebe Relationship added related to 0023312
2012-11-13 10:55 Martin Friebe Relationship deleted related to 0023312