Bug 80852 - Confusion with tab name on save-as
Summary: Confusion with tab name on save-as
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (other bugs)
Version First Reported In: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-03 20:20 UTC by Jon Smirl
Modified: 2004-05-03 22:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Smirl 2004-05-03 20:20:46 UTC
Version:           CVS (using KDE Devel)
Installed from:    Compiled sources

Open file a
Save as b
The edit buffer will still be named a in tab

Things are now confused.
Try to open b, it won't open
Open a and it will work, you'll have two a's open

The tab and the internal file name are in disagreement.
Comment 1 Jens Dagerbo 2004-05-03 22:04:12 UTC
CVS commit by dagerbo: 

make "save as" change the tab caption correctly again

CCMAIL: 80852-done@bugs.kde.org


  M +6 -5      newmainwindow.cpp   1.14


--- kdevelop/src/newmainwindow.cpp  #1.13:1.14
@@ -584,11 +584,12 @@ void NewMainWindow::slotPartURLChanged( 
         kdDebug() << k_funcinfo << endl;
         
-        if ( !ro_part || !ro_part->widget() || !ro_part->widget()->parentWidget() ) return;
-        
-        KMdiChildView * childView = dynamic_cast<KMdiChildView*>( ro_part->widget()->parentWidget() );
+        if ( QWidget * widget = EditorProxy::getInstance()->topWidgetForPart( ro_part ) )
+        {
+                KMdiChildView * childView = dynamic_cast<KMdiChildView*>( widget->parentWidget() );
         if ( childView )
         {
                 childView->setMDICaption( ro_part->url().fileName() );
         }
+        }
 }
 


Comment 2 Jens Dagerbo 2004-05-03 22:05:32 UTC
We broke this with the new "fast loading editor" mechanism recently. Thanks for the report!