fix, open d source from mini explorere broken by prev commit

This commit is contained in:
Basile Burg 2015-11-04 11:38:05 +01:00
parent 17f639d416
commit 139426241c
3 changed files with 10 additions and 2 deletions

View File

@ -24,7 +24,7 @@ inherited CEMessagesWidget: TCEMessagesWidget
Width = 759 Width = 759
Align = alClient Align = alClient
BorderSpacing.Around = 2 BorderSpacing.Around = 2
DefaultItemHeight = 18 DefaultItemHeight = 16
Font.Height = -12 Font.Height = -12
Font.Name = 'Courier New' Font.Name = 'Courier New'
Font.Quality = fqProof Font.Quality = fqProof

View File

@ -12,6 +12,9 @@ uses
type type
//TODO-cbugfix: the filter does not respect the categories
// e.g filter, reset filter, all the messages are displayed regardless of the selected category.
(** (**
* the struct linked to a log message. allow to be filtered. * the struct linked to a log message. allow to be filtered.
*) *)

View File

@ -4,6 +4,8 @@ unit ce_miniexplorer;
interface interface
//TODO-cbugfix: alphabetic sorting is broken after filter reset.
uses uses
Classes, SysUtils, FileUtil, ListFilterEdit, Forms, Controls, Graphics, Classes, SysUtils, FileUtil, ListFilterEdit, Forms, Controls, Graphics,
ExtCtrls, Menus, ComCtrls, Buttons, lcltype, strutils, ce_widget, ce_sharedres, ExtCtrls, Menus, ComCtrls, Buttons, lcltype, strutils, ce_widget, ce_sharedres,
@ -340,6 +342,7 @@ end;
procedure TCEMiniExplorerWidget.btnEditClick(Sender: TObject); procedure TCEMiniExplorerWidget.btnEditClick(Sender: TObject);
var var
fname: string; fname: string;
proj: boolean = false;
begin begin
if lstFiles.Selected = nil then exit; if lstFiles.Selected = nil then exit;
if lstFiles.Selected.Data = nil then exit; if lstFiles.Selected.Data = nil then exit;
@ -352,13 +355,15 @@ begin
begin begin
if assigned(fProj) then fProj.getProject.Free; if assigned(fProj) then fProj.getProject.Free;
TCENativeProject.create(nil); TCENativeProject.create(nil);
proj := true;
end end
else if isValidDubProject(fname) then else if isValidDubProject(fname) then
begin begin
if assigned(fProj) then fProj.getProject.Free; if assigned(fProj) then fProj.getProject.Free;
TCEDubProject.create(nil); TCEDubProject.create(nil);
proj := true;
end; end;
if assigned(fProj) then if assigned(fProj) and proj then
fProj.loadFromFile(fname) fProj.loadFromFile(fname)
else else
getMultiDocHandler.openDocument(fname); getMultiDocHandler.openDocument(fname);